﻿Imports OpenDelib.ServiceDeliberations

Public Class _Default
    Inherits OpenDelibPage


    Protected ReadOnly Property ApplicationIndicateurs As String
        Get
            Return Tools.GetInstance().Parametre(TypeParametre.ApplicationIndicateurs)
        End Get
    End Property


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Tools.GetInstance.isConnected() Then ctrlMenuApplication.Initialiser(Me.ApplicationIndicateurs)

        If Not IsPostBack Then
            If Tools.GetInstance.isConnected() Then
                Me.divImg.Visible = False
                Me.ctrlMenuApplication.Visible = True
                'Me.pnlIndicateurs.Visible = True
                'ChargerIndicateurs()
            Else
                Me.divImg.Visible = True
                Me.ctrlMenuApplication.Visible = False
                'Me.pnlIndicateurs.Visible = False
            End If
        End If
    End Sub

    'Private Sub ChargerIndicateurs()
    '    Dim collectionMenuPerso As List(Of ServiceMenu.Menu) = Nothing


    '    Using svc As New ServiceMenu.MenuPersonnelClient()
    '        Dim params As New ServiceMenu.ParametresRecupererMenuApplication
    '        params.Authentication = New ServiceMenu.AuthenticationParameters
    '        params.Authentication.Token = Tools.GetInstance().getToken()
    '        params.Application = Me.ApplicationIndicateurs

    '        Dim res As ServiceMenu.RecupererIndicateursPersonnelsResult
    '        res = svc.RecupererIndicateursPersonnels(params)
    '        If res.OK = False Then
    '            NotifyErreur(res.ErrorMessage)
    '        Else
    '            For Each indic As ServiceMenu.Indicateur In res.Indicateurs
    '                Dim divContent As New HtmlGenericControl("div")
    '                Dim lblChiffre As New Label
    '                lblChiffre.Text = CStr(indic.Nombre)
    '                lblChiffre.Style.Add("font-size", "40px")

    '                Dim lblLibelle As New Label
    '                lblLibelle.Text = vbCrLf & indic.Libelle
    '                lblLibelle.Style.Add("font-size", "15px")

    '                divContent.Controls.Add(lblChiffre)
    '                divContent.Controls.Add(New HtmlGenericSelfCloseControl("br"))
    '                divContent.Controls.Add(lblLibelle)

    '                divContent.Attributes.Add("onclick", "location.href='" & indic.Url & "'")
    '                divContent.Attributes.Add("class", "btnTuile")

    '                pnlIndicateurs.Controls.Add(divContent)
    '            Next
    '        End If
    '    End Using
    'End Sub

End Class